import Vue from 'vue'
import Vuex from 'vuex'
import login from './login/login.js'
import user from './user/user.js'
import rule from './ruleSetting/rule.js'
import dataFactory from "./dataCenter/dataFactory"
import fileManagement from './fileManagement/fileManagement.js'
import customList from './customList/customList.js'
Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        navList:[],//菜单数据
    },
    getters:{
        navListData:state => state.navList
    },
    mutations: {
        mtNavList(state,data){
            state.navList = data;
        }
    },
    actions: {
        sFnGetNavList({commit},data){
            // 调接口获取菜单数据
        }
    },
    modules: {
        login,
        user,
        rule,
        dataFactory,
        fileManagement,
        customList,
    }
})